package controllers

import (
	"git.oschina.net/fanbuchi/timemaker/models"
	"github.com/astaxie/beego"
)

const dataformat = "json"

type ApiController struct {
	beego.Controller
}

func (this *ApiController) Get() {
	objectStatus := models.ObjectStatus{Status: 0, Desc: "power by beego"}
	this.Data[dataformat] = objectStatus
	this.ServeJson()
}

func (this *ApiController) Api() {
	objectStatus := models.ObjectStatus{Status: 0, Desc: "api version 1.0  \r\n check api here http://127.0.0.1:8080/swagger/swagger-1"}
	this.Data[dataformat] = objectStatus
	this.ServeJson()
}
